package cn.golxen.counter.feign;

import cn.golxen.commons.entity.Result;
import cn.golxen.commons.vo.CounterVO;
import cn.golxen.commons.vo.GoodsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@FeignClient(value = "supermarket-management-goods")
public interface GoodsFeign {

    @PostMapping(value = "/goods/update")
    public Result updateGoods(@RequestBody GoodsVo goods, HttpServletRequest request);

    @PostMapping(value = "/goods/sell")
    public Result updateGoodsInventory(@RequestBody List<CounterVO> counterVO);
}
